package com.quasar.hpatient.presenter;
import com.quasar.hpatient.model.custommodel.InspactionBean;
import com.quasar.hpatient.model.requestmodel.RequestModel;
import com.quasar.hpatient.onInterface.AnotherResultListener;
import java.util.List;
/**
 * author : 许建宏
 * Date: 2017/10/28 0028
 * View:本地数据初始化化验单
 */

public class TestRecordPresenter {

    private RequestModel requestModel;
    private AnotherResultListener<List<InspactionBean>> testrecordView;

    public TestRecordPresenter(AnotherResultListener<List<InspactionBean>> testrecordView) {
        this.requestModel = new RequestModel();
        this.testrecordView = testrecordView;
    }

    public void getDataTest(){
        requestModel.GetTestData(new AnotherResultListener<List<InspactionBean>>() {
            @Override
            public void onSuccess(List<InspactionBean> data) {
                testrecordView.onSuccess(data);
            }

            @Override
            public void onError(String msg) {
                testrecordView.onError(msg);
            }

            @Override
            public void onRefreshUI() {
                testrecordView.onRefreshUI();
            }
        });
    }
}
